fix(blog): sanitize descriptionHtml before set:html - #207
Conversation
|
@SebTardif is attempting to deploy a commit to the Jamie's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Codex review: needs maintainer review before merge. Reviewed July 11, 2026, 8:32 PM ET / July 12, 2026, 00:32 UTC. Summary Reproducibility: yes. Current main has a high-confidence source reproduction from contributor-controlled Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Next step before merge
Security Review detailsBest possible solution: Merge the exact text-only schema and escaped-rendering fix while retaining the source invariant that prevents blog descriptions from regaining a raw-HTML sink. Do we have a high-confidence way to reproduce the issue? Yes. Current main has a high-confidence source reproduction from contributor-controlled Is this the best way to solve the issue? Yes. Removing the optional raw-HTML feature at both schema and render boundaries is the narrowest maintainable solution and avoids relying on a new handwritten sanitizer. AGENTS.md: found, but no applicable review policy affected this item. Codex review notes: model internal, reasoning high; reviewed against 10f1d9d2760b. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
|
@clawsweeper re-review Added What Problem This Solves, Evidence, and Real behavior proof with bun sanitize demo + unit suite output. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Co-authored-by: Sebastien Tardif <sebtardif@ncf.ca>
83aca6a to
456fc62
Compare
|
Maintainer proof for final exact head
Risk: low after proof. Files: 5, +14/-4. Sebastien remains credited as PR author and commit co-author. Merge recommendation: supported. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
What Problem This Solves
Blog posts can set
descriptionHtml(intentional links in the dek). Thatvalue is rendered with Astro
set:htmlwithout sanitization, so a maliciouscontent PR can inject script tags, event handlers, or
javascript:hrefsinto the built site.
Evidence
Terminal output from the patched sanitizer and unit suite on the PR branch.
Summary
src/lib/sanitize-html.tsallowlist sanitizersanitizeHtml(...)beforeset:htmlReal behavior proof
Related